updating oE defaultext

defaultext

include filesys.e 
namespace filesys 
public function defaultext(sequence path, sequence defext) 

returns the supplied filepath with the supplied extension, if the filepath does not have an extension already.

Parameters:
  1. path : the path to check for an extension.
  2. defext : the extension to add if path does not have one.
Returns:

A sequence, the path with an extension.

Example 1:
 -- ensure that the supplied path has an extension,  
 -- but if it doesn't use "tmp". 
theFile = defaultext(UserFileName, "tmp") 
See Also:

pathinfo

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu